from enum import Enum, IntEnum

class MessageType(str, Enum):
    """消息类型枚举"""
    ERROR = "error"      # 错误消息
    NOTIFY = "notify"    # 通知消息
    SUCCESS = "success"  # 成功消息
    WARNING = "warning"  # 警告消息
    INFO = "info"       # 信息消息

class StatusCode(IntEnum):
    """状态码枚举"""
    SUCCESS = 200           # 成功
    CREATED = 201          # 创建成功
    BAD_REQUEST = 400      # 请求错误
    UNAUTHORIZED = 401     # 未授权
    FORBIDDEN = 403        # 禁止访问
    NOT_FOUND = 404        # 资源不存在
    SERVER_ERROR = 500     # 服务器错误
    SERVICE_UNAVAIL = 503  # 服务不可用
    TIMEOUT = 504          # 超时

class EventMessageType(str, Enum):
    """事件消息类型枚举"""
    TYPE = "type"      # 前端消息
    FRONT = "front"      # 前端消息
    FILE = "file"      # 文件消息
    RAG = "rag"      # 文件消息

